﻿<UserControl 	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 	
                xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                xmlns:local="clr-namespace:DiskUsage" 	
                mc:Ignorable="d" 	
                x:Class="DiskUsage.DriveInfoControl" 
                x:Name="UserControl" d:DesignHeight="300" d:DesignWidth="400">
    
    <Grid x:Name="LayoutRoot" HorizontalAlignment="Left" VerticalAlignment="Top" 
          Width="{Binding Path=ActualWidth,  RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:DriveInfoControl}}}">
        <Grid.ContextMenu>
            <ContextMenu StaysOpen="true">
                <MenuItem Header="Refresh" Click="Refresh_Click"/>
            </ContextMenu>
        </Grid.ContextMenu>
        <DockPanel>
            <Expander Header="Hard Disk Drives" DockPanel.Dock="Top" IsExpanded="True" Foreground="Blue">
                <local:DriveListBoxControl x:Name="m_harddisk"/>
            </Expander>
            <Separator HorizontalAlignment="Stretch" DockPanel.Dock="Top" Background="LightGray"/>
            <Expander Header="Devices with Removable Storage" DockPanel.Dock="Top" IsExpanded="True" Foreground="Blue">
                <local:DriveListBoxControl x:Name="m_removable"/>
            </Expander>
        </DockPanel>
    </Grid>
</UserControl>